home *** CD-ROM | disk | FTP | other *** search
- function onEnterFrame()
- {
- totalScoreVar = _parent.score;
- if(scoreSwitch == 0)
- {
- if(timer < 20)
- {
- timer++;
- }
- else if(timer < 40)
- {
- collect._y -= (collect._y - 420) / 5;
- timer++;
- }
- else if(collect.fruitCollect > 0)
- {
- collect.fruitCollect--;
- collect._xscale += 30;
- collect._yscale = collect._xscale;
- scoreVar += 10;
- _parent.score += 10;
- timer -= 3;
- _parent.STAGE.newSound("Sound_Fruit");
- }
- else
- {
- _parent.GAME.function_newParticle(collect._x,collect._y,"Class_Particle",5);
- _parent.STAGE.newSound("Sound_Fruit");
- collect.swapDepths(0);
- collect.removeMovieClip();
- scoreSwitch = 1;
- timer = 0;
- }
- if(collect._xscale > 100)
- {
- collect._xscale /= 1.1;
- collect._yscale /= 1.1;
- }
- }
- else if(scoreSwitch == 1)
- {
- if(timer < 20)
- {
- timer++;
- }
- else if(timer < 40)
- {
- timeMC._y -= (timeMC._y - 420) / 5;
- timer++;
- }
- else if(timeMC.timer > 0)
- {
- timeMC.timer--;
- timeMC._xscale += 30;
- timeMC._yscale = timeMC._xscale;
- if(scoreVar > 0)
- {
- scoreVar -= 1;
- _parent.score -= 1;
- }
- if(soundSwitch == true)
- {
- soundSwitch = false;
- _parent.STAGE.newSound("Sound_Fruit");
- }
- else
- {
- soundSwitch = true;
- }
- }
- else
- {
- _parent.STAGE.newSound("Sound_Fruit");
- timeMC.swapDepths(0);
- timeMC.removeMovieClip();
- scoreSwitch = 2;
- timer = 0;
- }
- if(timeMC._xscale > 100)
- {
- timeMC._xscale /= 1.2;
- timeMC._yscale /= 1.2;
- }
- }
- else if(scoreSwitch == 2)
- {
- if(timer < 30)
- {
- timer++;
- }
- else if(timer == 30)
- {
- if(_parent.shortGame == false)
- {
- _parent["LEVEL" + levelID + "COMPLETE"] = true;
- if(scoreVar > _parent["LEVEL" + levelID + "SCORE"])
- {
- _parent["LEVEL" + levelID + "SCORE"] = scoreVar;
- }
- _parent.saveAllData();
- _parent.levelID = _parent.levelID + 1;
- _parent.fade("LOADER",10);
- }
- else
- {
- _parent.score = 0;
- _parent.fade("SELECT",10);
- }
- timer++;
- }
- }
- }
- timer = 0;
- scoreVar = 0;
- scoreSwitch = 0;
- totalScoreVar = _parent.score;
-